<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <h1>404</h1>
      <p>页面未找到</p>
      <p>抱歉，您访问的页面不存在或已被移除</p>
      <router-link to="/login" class="back-btn">返回登录页</router-link>
      <router-link v-if="authStore.isAuthenticated" to="/admin" class="back-btn">返回管理后台</router-link>
    </div>
  </div>
</template>

<script setup>
import { useAuthStore } from '@/stores/auth'

const authStore = useAuthStore()
</script>

<style scoped>
.not-found-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.not-found-content {
  text-align: center;
  padding: 2rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.not-found-content h1 {
  font-size: 5rem;
  margin: 0 0 1rem 0;
  color: #3498db;
}

.not-found-content p {
  font-size: 1.2rem;
  color: #555;
  margin: 0 0 1.5rem 0;
}

.back-btn {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #2980b9;
}
</style>
